import {
    DIC
} from '@/const/dic';
import {
    timeFormatter
} from '../formatter';
import Store from '../../store/';
const allPermission = Store.state.user.permission;
const isAdmin = Store.state.user.userInfo.superAdmin;
export const userTableOption = {
    border: true,
    index: true,
    selection: false,
    calcHeight: 350,
    columnBtn: false,
    searchClearable: false,
    selectClearBtn: false,
    searchResetBtn: false,
    height: "auto",
    menu: false,
    menuAlign: "center",
    searchBtn: true,
    labelWidth: 120,
    refreshBtn: true,
    tip: false,
    addBtn: false,
    dialogWidth: '800px',
    dialogHeight: 'auto',
    menuWidth: 180,
    editBtn: false,
    viewBtn: false,
    delBtn: false,
    column: [{
            "label": "手机号",
            "prop": "telephone",
            "search": true,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false
        },
        {
            "label": "会员等级",
            "prop": "member_level",
            "search": false,
            "type": "tag",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "dicData": DIC["member_level"],
            "hide": false,
            "rules": [{
                "required": true,
                "message": "请输入会员等级",
                "trigger": "blur"
            }]
        },
        {
            "label": "微信昵称",
            "prop": "nickname",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false
        },
        {
            "label": "头像",
            "prop": "avatar",
            "type": "upload",
            "fixed": false,
            "width": "auto",
            "row": true,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "listType": "picture-img",
            "showFileList": false,
            "imgHeight": 60,
            "imgWidth": "auto",
            "action": "/upload/image",
            "tip": "只能上传jpg/png文件，且不超过500kb",
            "rules": [{
                "required": true,
                "message": "请上传正面头像",
                "trigger": "blur"
            }]
        },
        {
            "label": "签名",
            "prop": "signature",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [{
                "required": true,
                "message": "请输入签名",
                "trigger": "blur"
            }]
        },
        {
            "label": "是否实名认证",
            "prop": "is_authed",
            "search": false,
            "type": "tag",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [{
                "required": true,
                "message": "请选择是否实名认证",
                "trigger": "blur"
            }],
            "placeholder": "请选择是否实名认证",
            "dicData": DIC["YesNo"]
        },
        {
            "label": "真实姓名",
            "prop": "realname",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [{
                "required": true,
                "message": "请输入真实姓名",
                "trigger": "blur"
            }]
        },
        {
            "label": "身份证号码",
            "prop": "identity",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [{
                "required": true,
                "message": "请输入身份证号码",
                "trigger": "blur"
            }]
        },
        {
            "label": "正面头像",
            "prop": "front_id_img",
            "search": false,
            "type": "upload",
            "fixed": false,
            "width": "auto",
            "row": true,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "listType": "picture-img",
            "showFileList": false,
            "imgHeight": 60,
            "imgWidth": "auto",
            "action": "/upload/image",
            "tip": "只能上传jpg/png文件，且不超过500kb",
            "rules": [{
                "required": true,
                "message": "请上传正面头像",
                "trigger": "blur"
            }]
        },
        {
            "label": "反面头像",
            "prop": "back_id_img",
            "search": false,
            "type": "upload",
            "fixed": false,
            "width": "auto",
            "row": true,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "listType": "picture-img",
            "showFileList": false,
            "imgHeight": 60,
            "imgWidth": "auto",
            "action": "/upload/image",
            "tip": "只能上传jpg/png文件，且不超过500kb",
            "rules": [{
                "required": true,
                "message": "请上传正面头像",
                "trigger": "blur"
            }]
        },
        {
            "label": "创建时间",
            "prop": "create_time",
            "search": false,
            "type": "datetime",
            "fixed": false,
            "width": "160",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false
        },
        {
            "label": "修改时间",
            "prop": "modify_time",
            "search": false,
            "type": "datetime",
            "fixed": false,
            "width": "160",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false
        },

        {
            "label": "会员失效时间",
            "prop": "member_expire_time",
            "search": false,
            "type": "datetime",
            "fixed": false,
            "width": "160",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false
        },
        {
            "label": "推荐人",
            "prop": "recommender_name",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [{
                "required": true,
                "message": "请选择推荐人",
                "trigger": "blur"
            }]
        },
        {
            "label": "佣金",
            "prop": "commission",
            "search": false,
            "type": "number",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [{
                "required": true,
                "message": "请输入佣金",
                "trigger": "blur"
            }]
        }
    ]
};
